package cn.mxb.logic.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.mxb.floor.pagination.Result;
import cn.mxb.logic.dao.RoleUserDAO;
import cn.mxb.logic.entity.RoleUser;
import cn.mxb.logic.service.IRoleUserService;

@Service("roleUserService")
public class RoleUserServiceImpl  implements IRoleUserService {

	@Autowired
	private RoleUserDAO roleUserDAO;
	
	
	@Override
	public RoleUser findByProperty(String property, String value) {
		return roleUserDAO.findByProperty(property, value);
	}

	/**
	 * 分页
	 */
	@Override
	public Result<RoleUser> find(RoleUser roleUser, int page, int row) {
		return roleUserDAO.find(roleUser, page, row);
	}

	/**
	 * add
	 */
	@Override
	public RoleUser add(RoleUser roleUser) {
		return roleUserDAO.save(roleUser);
	}

	@Override
	public void delete(int id) {
		roleUserDAO.remove(RoleUser.class,id);
	}
	@Override
	public void update(RoleUser roleUser) {
		
	}
	
	@Override
	public List<RoleUser> findListByProperty(String property, String value) {
		return roleUserDAO.findListByProperty(property, value);
	}

	/**
	 * 查询全部
	 */
	@Override
	public List<RoleUser> findAllList() {
		return roleUserDAO.getAll(RoleUser.class);
	}


	
}
